package com.yeskery.transfer.core;

import lombok.Setter;

/**
 * 字符串key
 * @author shuangjiang.du
 * @date 2018-12-13 09:47
 * @version 1.0
 */
@Setter
public class StringKey implements Key<String> {

	/** key */
	private String key;

	/**
	 * 创建一个key对象
	 * @param key key
	 */
	public StringKey(String key) {
		this.key = key;
	}

	@Override
	public String getKey() {
		return key;
	}

	@Override
	public int hashCode() {
		return key.hashCode();
	}

	@Override
	public boolean equals(Object obj) {
		return key.equals(obj);
	}
}
